package com.xxwy.bean.environment;

import com.xxwy.bean.User;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 3.1前查找 = PropertyPlaceholderConfigurer
 * 3.1后查找 = PropertySourcePlaceholderConfigurer
 *
 * @author xxwy
 * @date 2021/9/22 0022
 */
public class PropertyPlaceholderConfigurerDemo {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("META-INF/placeholders-resolver.xml");
        applicationContext.start();
        User user = applicationContext.getBean("user", User.class);
        System.out.println(user);
        applicationContext.close();
    }
}
